package com.itheima.service;

import com.itheima.dao.BookDao;
import com.itheima.pojo.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookService {
   @Autowired
    BookDao bookDao;
   public List<Book> find(){
       List<Book> list = bookDao.getAll();
       return list;
   }

    public boolean addtime(String name,String ip) {
        int addtime = bookDao.addtime(name,ip);
        if(addtime>0){
            return true;
        }
        return false;
    }
}
